package com.zlp.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.zlp.entity.User;
import com.zlp.mapper.UserMapper;
import com.zlp.service.UserService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 管理用户表 服务实现类
 * </p>
 *
 * @author LiPing.Zou
 * @since 2021-03-15
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {

    @Override
    public User loadUserByUsername(String username) {

        User user = this.getOne(new QueryWrapper<>(new User()).eq("username", username));
        return user;
    }
}
